import request from '@/utils/request'

// 获取列表数据
export function getPermissionListApi() {
  return request({
    url: '/sys/permission',
    method: 'get'
  })
}

// 添加
export function addPermissionApi(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

// 修改
export function updatePermissionApi(data) {
  return request({
    url: '/sys/permission/' + data.id,
    method: 'put',
    data
  })
}

// 删除
export function deletePermissionApi(id) {
  return request({
    url: '/sys/permission/' + id,
    method: 'delete'
  })
}

// 编辑回显请求
export function infoPermissionApi(id) {
  return request({
    url: '/sys/permission/' + id,
    method: 'get'
  })
}
